package com.furongji.education.controller.admin;


import com.furongji.common.result.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;

@Tag(name = "后台登录管理")
@RestController
@RequestMapping("/admin/users")
public class UserAdminController {

    @Operation(summary = "后台登录")
    @PostMapping("/login")
    public Result login() {
        Map map = new HashMap();
        map.put("token", "admin");
        return Result.success(map);
    }

    @Operation(summary = "获取头像")
    @GetMapping("/info")
    public Result getInfo() {
        Map map = new HashMap();
        map.put("roles", "[admin]");
        map.put("name", "admin");
        map.put("avatar", "https://tse1-mm.cn.bing.net/th/id/OIP-C.OSFH3hIukHqh-qrOvIfUWgAAAA?w=145&h=180&c=7&r=0&o=5&pid=1.7");
        return Result.success(map);
    }

    @Operation(summary = "退出登录")
    @PostMapping("/logout")
    public Result logout() {
        return Result.success();
    }
}
